﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace RestaurantWPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void OnResetTextBoxesClick(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void OnLoginUserClick(object sender, RoutedEventArgs e)
        {
            if (this.login.Text.ToLower() == "waiter")    //if login is "Waiter" and password exists should open the relevant waiter's window
            {                                             //must be made to work with multiple waiters - not done yet
                var newWindow = new WaiterMain();
                newWindow.Show();
            }
            else if (this.login.Text.ToLower() == "kitchen")
            {
                var newWindow = new CookMain();
                newWindow.Show();
            }
            else if (this.login.Text.ToLower() == "bar")
            {
                var newWindow = new BartenderMain();
                newWindow.Show();
            }
            else if (this.login.Text.ToLower() == "owner")
            {
                var newWindow = new Owner();
                newWindow.Show();
            }

        }

    }
}
